<template>
  <div class="header">
    <span class="iconfont icon-fanhui" v-if="hasback" @click="goback"></span>
    {{ title }}
    <span class="iconfont icon-caidan" v-if="hasmeun"></span>
  </div>
</template>

<script>
export default {
  props: {
    hasback: Boolean,
    hasmeun: Boolean,
    title: String,
  },
  data() {
    return {};
  },
  methods: {
    goback() {
      this.$router.go(-1);
    },
  },
  // 跳转电影介绍页
  gotodetail(id) {
    this.$router.push("/detail/" + id);
  },
};
</script>

<style lang="less" scoped>
@import "../../assets/css/var.less";
.header {
  width: 100%;
  height: 50px;
  background: @m-color;
  color: #fff;
  font-size: @l-font;
  top: 0;
  left: 0;
  .center();
  .iconfont {
    position: absolute;
    font-size: @xl-font;
  }
  .icon-fanhui {
    left: 15px;
    font-size: 10px;
  }
  .icon-caidan {
    right: 15px;
  }
}
</style>
